package com.ruoyi.common.core.domain.entity;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.TreeEntity;

import java.util.ArrayList;
import java.util.List;

/**
 * 部门对象 cus_dept
 * 
 * @author ruoyi
 * @date 2024-03-20
 */
public class CusDept extends TreeEntity
{
    private static final long serialVersionUID = 1L;

    /** 部门ID */
    private Long deptId;

    /** 父ID */
    @Excel(name = "父ID")
    private Long parentId;

    /** 部门名称 */
    @Excel(name = "部门名称")
    private String deptName;

    /** 状态 */
    @Excel(name = "状态")
    private String status;

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    @Override
    public List<CusDept> getChildren() {
        return children;
    }

    public void setChildren(List<?> children) {
        this.children = (List<CusDept>) children;
    }

    /** 子部门 */
    private List<CusDept> children = new ArrayList<CusDept>();

    /** 父部门名称 */
    private String parentName;



    @Override
    public String getParentName() {
        return parentName;
    }

    @Override
    public void setParentName(String parentName) {
        this.parentName = parentName;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    @Override
    public Long getParentId() {
        return parentId;
    }

    @Override
    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("deptId", getDeptId())
            .append("parentId", getParentId())
            .append("ancestors", getAncestors())
            .append("deptName", getDeptName())
            .append("orderNum", getOrderNum())
            .append("status", getStatus()).append("delFlag",getDelFlag())
            .toString();
    }
}
